<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>01_变量提升与函数提升</title>
</head>

<body>
    <script type="text/javascript">
        var a = 3
        function fn() {
            console.log(a);
            var a = 4
        }
        fn()

        console.log(b);
        var b = 4;

        fn2()

        function fn2() {
            console.log('fn2()');
        }
        fn3()

        var fn3 = function () {
            console.log('fn3()');
        }
    </script>
</body>

</html>